package com.example.domain;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @author 袁小弘
 * @describe 培训中心学生管理————用户类
 * @date 2019-12-17 9:34
 */
@Entity
@Table(name = "users")
public class User implements Serializable {


    private static final long serialVersionUID = 2023455789336162246L;

    @Id
    @GeneratedValue
    @Column(name = "user_Id", length = 11)
    private Integer userId; //用户ID

    @Column(name = "account", length = 32)
    private String userName;//用户账户

    @Column(name = "nickName", length = 32)
    private String nickName;//用户昵称

    @Column(name = "sex", length = 2)
    private String sex;//用户性别

    @Column(name = "telephone", length = 11)
    private String telephone;//用户手机号码

    @Column(name = "email", length = 32)
    private String email;//用户邮箱

    @Column(name = "birthday", length = 32)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Timestamp birthday;//用户生日

    @Column(name = "comment", length = 255)
    private String comment;//备注信息

    @Column(name = "recordTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp recordTime;//创建记录时间

    @Column(name = "updateTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp updateTime;//更新记录时间

    public User() {
        //无参构造
    }


    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getNickName() {
        return nickName;
    }


    public void setNickName(String nickName) {
        this.nickName = nickName;
    }


    public String getSex() {
        return sex;
    }


    public void setSex(String sex) {
        this.sex = sex;
    }


    public String getTelephone() {
        return telephone;
    }


    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }


    public String getEmail() {
        return email;
    }


    public void setEmail(String email) {
        this.email = email;
    }


    public Timestamp getBirthday() {
        return birthday;
    }


    public void setBirthday(Timestamp birthday) {
        this.birthday = birthday;
    }


    public String getComment() {
        return comment;
    }


    public void setComment(String comment) {
        this.comment = comment;
    }


    public Timestamp getRecordTime() {
        return recordTime;
    }


    public void setRecordTime(Timestamp recordTime) {
        this.recordTime = recordTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }


    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }


    @Override
    public String toString() {
        return "User [userId=" + userId + ", userName=" + userName + ", nickName=" + nickName + ", sex=" + sex
                + ", telephone=" + telephone + ", email=" + email + ", birthday=" + birthday + ", comment=" + comment
                + ", recordTime=" + recordTime + ", updateTime=" + updateTime + "]";
    }


}
